package com.eckey.pub.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: ChengLiang
 * @CreateTime: 2023-05-22  10:19
 * @Description: TODO
 * @Version: 1.0
 */
@Configuration
@ConditionalOnClass(AllowListProperties.class)
public class AllowListAutoConfiguration {

    @Bean("allowListConfig")
    @ConditionalOnMissingBean
    public String allowListConfig(AllowListProperties properties) {
        return properties.getUserNames();
    }

}
